﻿using DapperExtensions.Mapper;
using ZLWeb.WebApiEntityBase;

namespace ZL.CRM.CommonEntity.Common
{
    public class Balanceinfo : ResponseResultInfo
    {
        /// <summary>
        /// 账户显示名称
        /// </summary>
        public string Accname { get; set; }

        /// <summary>
        /// 押金(所有实体卡押金之和)
        /// </summary>
        public decimal Cdepositsum { get; set; }

        /// <summary>
        /// 工本费(所有实体卡工本费之和)
        /// </summary>
        public decimal Cfeesum { get; set; }

        /// <summary>
        /// 总余额：现金金额（充值入-累计出）
        /// </summary>
        public decimal Acccashbalancesum { get; set; }

        /// <summary>
        /// 总余额：增值金额（充值入-累计出）
        /// </summary>
        public decimal Accaddbalancesum { get; set; }


        /// <summary>
        /// 总余额：可用红包
        /// </summary>
        public decimal Acchb { get; set; }

        /// <summary>
        /// 总余额：可兑积分
        /// </summary>
        public int Accjfusable { get; set; }

        /// <summary>
        /// 总余额：不可兑积分
        /// </summary>
        public int Accjf { get; set; }

    }

    public class BalanceinfoMapper : ClassMapper<Balanceinfo>
    {
        public BalanceinfoMapper()
        {
            Table("#Balanceinfo");
            Map(f => f.Accname).Column("accname");
            Map(f => f.Cdepositsum).Column("cdepositsum");
            Map(f => f.Cfeesum).Column("cfeesum");
            Map(f => f.Acccashbalancesum).Column("acccashbalancesum");
            Map(f => f.Accaddbalancesum).Column("accaddbalancesum");
            Map(f => f.Acchb).Column("acchb");
            Map(f => f.Accjfusable).Column("accjfusable");
            Map(f => f.Accjf).Column("accjf");
        }
    }
}
